/**
 *
 */
package com.angel.data.generator.validators.impl;

import com.angel.common.helpers.AnnotationHelper;
import com.angel.data.generator.annotations.Generator;
import com.angel.data.generator.exceptions.DataGeneratorBuilderValidatorException;
import com.angel.data.generator.validators.DataGeneratorBuilderValidator;

/**
 * @author William
 *
 */
public class GeneratorAnnotationClassValidator implements DataGeneratorBuilderValidator{

	public void validate(Class<?> dataGeneratorClass) throws DataGeneratorBuilderValidatorException {
		boolean containsAnnotation = AnnotationHelper.hasAnnotation(dataGeneratorClass, Generator.class);
		if(!containsAnnotation){
			throw new DataGeneratorBuilderValidatorException("Data object generator class [" + dataGeneratorClass + "] not contains Generator.class annotation.");
		}
	}
}
